package stool.simplefactory;

/**
 * @author Felix YF Dong
 * @date 2021/5/2
 * @description 简单工厂模式
 */
public class Main {

    public static void main(String[] args) {

        Operation operation = null;
        try {
            operation = OperationFactory.createOperate("-");
        } catch (Exception e) {
            System.out.println(e.getMessage());
            return;
        }

        operation.setNumberA(1);
        operation.setNumberB(1);

        System.out.println(operation.getResult());

    }
}
